package com.beta.mq.redis.producer.annotation;

import java.lang.annotation.*;

/**
 * 将方法中非空的返回对象作为消息内容发送出去
 *
 * @author taofucheng
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ToQueue {

    String topic();

    int expire() default ExpireTime.NEVER_EXPIRES;

    class ExpireTime {
        public static final int NEVER_EXPIRES = -1;
    }
}
